﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Farming.EntityFarmeworkCore.Migrations
{
    public partial class farmingsystem10 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "HusbandryEnterpriseImageses",
                columns: table => new
                {
                    EnterpriseImagesId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DynamicVerification = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CorporatePhoto = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateById = table.Column<int>(type: "int", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateById = table.Column<int>(type: "int", nullable: true),
                    UpdateByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteById = table.Column<int>(type: "int", nullable: true),
                    DeleteByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HusbandryEnterpriseImageses", x => x.EnterpriseImagesId);
                });

            migrationBuilder.CreateTable(
                name: "HusbandryEnterprises",
                columns: table => new
                {
                    EnterpriseId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    iid = table.Column<int>(type: "int", nullable: false),
                    EnterpriseFarm = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EnterprisePrincipal = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    EnterpriseNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateById = table.Column<int>(type: "int", nullable: true),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateById = table.Column<int>(type: "int", nullable: true),
                    UpdateByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteById = table.Column<int>(type: "int", nullable: true),
                    DeleteByName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HusbandryEnterprises", x => x.EnterpriseId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "HusbandryEnterpriseImageses");

            migrationBuilder.DropTable(
                name: "HusbandryEnterprises");
        }
    }
}
